package com.asman.vr.dto

import androidx.annotation.MainThread
import com.asman.vr.network.Api
import com.asman.vr.network.RequestBody
import com.asman.vr.network.liveData
import com.asman.vr.network.liveDataNull
import java.util.concurrent.Executor

class CustomMyHomeRepository(private val api: Api, private val networkExecutor: Executor) {

    @MainThread
    fun searchBuildingList(name: String?) = liveData(api.searchBuildingList(name))

    @MainThread
    fun getHotBuilding() = liveData(api.getHotBuilding())

    @MainThread
    fun submitMyCustom(body: RequestBody.UploadMyHomeCustom) =
        liveDataNull(api.submitMyCustom(body))

    @MainThread
    fun submitMyBuild(body: RequestBody.BuildMyHomeRequestBody) =
        liveDataNull(api.submitMyBuild(body))

}